/**
 * Copyright (c) 2015-2020, wss 王山山
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.wss.conversion;

import com.jfinal.aop.Interceptor;
import com.jfinal.core.Controller;
import com.jfinal.handler.Handler;
import com.jfinal.plugin.IPlugin;
import com.jfinal.plugin.activerecord.Model;
import com.wss.conversion.annotations.AutoHandler;
import com.wss.conversion.annotations.AutoInterceptor;
import com.wss.conversion.annotations.AutoPlugin;
import com.wss.conversion.annotations.Dao;
import com.wss.conversion.annotations.Route;

/**
 * 使用常量
 * 
 * @author wss
 *
 */
public class Constants {
	/**
	 * 存储Model相关常量
	 */
	public static class ModelConstants {
		/**
		 * 标注Model的注解
		 */
		public static final Class<Dao> DAO_CLASS = Dao.class;
		/**
		 * Model名称后缀
		 */
		public static final String MODEL_SUFFIX = "Model";
		/**
		 * Model的父类
		 */
		public static final Class<?> PARENT_CLASS = Model.class;
	}
	
	/**
	 * 存储Controller相关的常量
	 */
	public static class ControllerConstants {
		/**
		 * 标注控制器的注解
		 */
		public static final Class<Route> ROUTE_CLASS = Route.class;
		/**
		 * 控制器名称后缀
		 */
		public static final String CONTROLLER_SUFFIX = "Controller";
		/**
		 * URI分隔符
		 */
		public static final String URI_SEPARATOR = "/";
		/**
		 * 控制器的父类
		 */
		public static final Class<?> PARENT_CLASS = Controller.class;
	}
	
	/**
	 * 存储Handler相关常量 
	 */
	public static class HandlerConstants {
		/**
		 * 用于标注Handler的注解类
		 */
		public static final Class<AutoHandler> AUTOHANDLER_CLASS = AutoHandler.class;
		/**
		 * Handler后缀
		 */
		public static final String HANDLER_SUFFIX = "Handler";
		/**
		 * 自定义Handler的父类
		 */
		public static final Class<?> PARENT_CLASS = Handler.class;
	}
	
	/**
	 * 存储Interceptor相关常量 
	 */
	public static class InterceptorConstants {
		/**
		 * 用于标注拦截器的注解类
		 */
		public static final Class<AutoInterceptor> AUTOINTERCEPTOR_CLASS = AutoInterceptor.class;
		/**
		 * 拦截器的后缀
		 */
		public static final String INTERCEPTOR_SUFFIX = "Interceptor";
		/**
		 * 自定义拦截器的父类
		 */
		public static final Class<?> PARENT_CLASS = Interceptor.class;
	}
	
	/**
	 * 存储Plugin相关常量 
	 */
	public static class PluginConstants {
		/**
		 * 用于标注插件的注解类
		 */
		public static final Class<AutoPlugin> AUTOPLUGIN_CLASS = AutoPlugin.class;
		/**
		 * 插件后缀
		 */
		public static final String PLUGIN_SUFFIX = "Plugin";
		/**
		 * 自定义插件的父类
		 */
		public static final Class<?> PARENT_CLASS = IPlugin.class;
	}
}
